package cn.autumnorange.app.user.consumer.authorization.system.userDetails;

import cn.autumnorange.app.common.dto.BaseDto;
import lombok.Getter;
import lombok.Setter;

import java.util.Objects;

@Setter
@Getter
public abstract class AbstractUserDto extends BaseDto {
  private String password;

  @Override
  public boolean equals(Object o) {
    if (this == o) {
      return true;
    }
    if (!(o instanceof AbstractUserDto)) {
      return false;
    }
    if (!super.equals(o)) {
      return false;
    }
    AbstractUserDto that = (AbstractUserDto) o;
    return Objects.equals(password, that.password);
  }

  @Override
  public int hashCode() {

    return Objects.hash(super.hashCode(), password);
  }
}
